package cn.com.zero.sample.trade.provider.service;

import cn.com.zero.db.util.PageQueryUtil;
import cn.com.zero.db.vo.PageParamsVO;
import cn.com.zero.db.vo.PageVO;
import cn.com.zero.sample.trade.api.po.OrderPO;
import cn.com.zero.sample.trade.api.service.IOrderService;
import cn.com.zero.sample.trade.provider.mapper.IOrderMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author liuxh
 * @version 1.0.0
 * @Description 委托实现
 * @createTime 2022/7/27 11:44
 */
@Component
@DubboService
public class OrderService implements IOrderService {

    @Autowired
    private IOrderMapper orderMapper;

    @Override
    public int order(OrderPO orderPO) {
        return 0;
    }

    @Override
    public OrderPO getPaymentById(Long id) {
        return null;
    }

    @Override
    public List<OrderPO> getPaymentList() {
        return orderMapper.getPaymentList();
    }

    @Override
    public PageVO<OrderPO> getPaymentRPCList(PageParamsVO pageParams) {
        return PageQueryUtil.getPageInfo(pageParams,()->orderMapper.getPaymentList());
    }


}
